(function() {
    try {
        var c = "";
        function g(y) {
            y = y.replace("/[\\[]/", "\\[").replace("/[\\]]/", "\\]");
            var e = window.location.href;
            var z = "[\\?&]" + y + "=([^&#]*)", v = new RegExp(z), x = v.exec(e);
            if (x) {
                var w = "", u = x[1].replace(/\+/g, " ");
                try {
                    w = u;
                    return w
                } catch (A) {
                    return""
                }
            }
            return""
        }
        var P = "2_5_" + g("a");
        var q = ["http://cms.tanx.com/t.gif?tanx_nid=29600513&tanx_cm&ext_data=" + P, "http://cm.g.doubleclick.net/pixel?google_nid=ipy&google_cm&ext_data=" + P, "http://cm.g.doubleclick.net/pixel?google_nid=ipym&google_cm&ext_data=" + P, "http://sax.sina.com.cn/cm?sina_nid=1&ext_data=" + P, "http://cm.l.qq.com/?dspid=10016&dspuid=G1LIOs21cjIy&gettuid=1&ext_data=" + P, "http://c.yes.youku.com/cm.gif?dspid=11112", "http://cm.pos.baidu.com/pixel?dspid=6418041&ext_data=" + P, "http://cc.xtgreat.com/cm.gif?dspid=11164&ext_data=" + P, "http://cm.qtmojo.com/pixel?allyes_dspid=192&allyes_cm&ext_data=" + P, "http://ckm.iqiyi.com/pixel?qiyi_nid=71000015&qiyi_sc", "http://cm.fastapi.net/?dspid=100018&gethuid=1&dspuid=G1PH766EsY_&ext_data=", "http://t.go.sohu.com/cm.gif?ver=1&mid=10012&ext_data=" + P, "http://cm.vamaker.com/pixel?vamaker_dspid=11168120&vamaker_cm&v=1&ext_data=" + P];
        var m = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
        function o(e) {
            return Object.prototype.toString.call(e) === "[object Array]"
        }
        function k(u, e) {
            return u - e
        }
        var n = {set: function(x, e, w) {
                var v = new Date();
                v.setDate(v.getDate() + w);
                document.cookie = x + "=" + encodeURIComponent(e) + ((w == null) ? "" : ";expires=" + v.toGMTString());
                try {
                    if (window.localStorage) {
                        window.localStorage.setItem(x, e)
                    }
                } catch (u) {
                }
            }, get: function(x) {
                if (!document.cookie) {
                    return""
                }
                var e = new RegExp("(^| )" + x + "=([^;]*)(;|\x24)"), w = e.exec(document.cookie);
                if (!w) {
                    return""
                }
                var u = w[2] || "";
                if ("string" == typeof u) {
                    u = decodeURIComponent(u);
                    return u
                }
                try {
                    if (window.localStorage) {
                        return window.localStorage.getItem(x) || ""
                    }
                } catch (v) {
                }
                return""
            }};
        var O = function(e) {
            for (var u = 0; u < q.length; u++) {
                if (e == q[u]) {
                    return u
                }
            }
            return 0
        };
        var p = function() {
            var e = n.get("py_map_list").split("&")[0];
            var u = e.split("/").join(" ");
            var w = new Date(), v = w.getFullYear() + "/" + (w.getMonth() + 1) + "/" + w.getDate();
            return u || v
        };
        var a = function(x, w) {
            var y = x;
            var e = w;
            for (var A = 0; A < y.length; A++) {
                for (var z = 0; z < e.length; z++) {
                    if (y[A] == e[z]) {
                        y[A] = null;
                        e[z] = null
                    }
                }
            }
            var u = y.concat(e);
            var v = u.length;
            while (v--) {
                if (u[v] == null) {
                    u.splice(v, 1)
                }
            }
            u = u.sort(k);
            return u
        };
        var l = function() {
            var u = p();
            var e = new Date(u).getTime();
            var v = new Date().getTime();
            return Math.floor((v - e) / 86400000)
        };
        var b = function(v) {
            try {
                if (v.length < 2) {
                    return v
                }
                var u = [v[0]];
                for (var w = 1; w < v.length; w++) {
                    if (v.indexOf(v[w]) == w) {
                        if (v[w] != "" && v[w] != null) {
                            u.push(v[w])
                        }
                    }
                }
                if (u[0] == "") {
                    u.splice(0, 1)
                }
                return u.sort(k)
            } catch (e) {
                return v
            }
        };
        var j = function() {
            var e = n.get("py_map_list").split("&");
            if (e.length > 1) {
                if (o(e[1].split("-"))) {
                    e = b(e[1].split("-"));
                    return e
                }
            }
            return[]
        };
        var s = function() {
            var e = a(m, j());
            var v = [];
            for (var w = 0; w < e.length; w++) {
                var u = e[w];
                v.push(q[u])
            }
            return v
        };
        var f;
        function h() {
            if (_maps.length > 0) {
                r()
            }
        }
        function r() {
            var v = document.createElement("img");
            c = _maps[0];
            if (c != undefined) {
                v.setAttribute("src", c);
                v.setAttribute("id", "mapImg");
                v.onload = i;
                document.body.appendChild(v);
                v.style.display = "none";
                _maps.splice(0, 1);
                var w = O(c);
                var u = j();
                u.push(w);
                var e = u.join("-");
                var x = p().split(" ").join("/");
                n.set("py_map_list", (x + "&" + e), 1)
            }
            if (_maps.length > 0) {
                f = setTimeout(h, 3000)
            }
        }
        function i() {
            clearTimeout(f);
            this.parentNode.removeChild(this);
            setTimeout(r, 20)
        }
        var t = function() {
            var u = l();
            if (u >= 1) {
                n.set("py_map_list", "")
            }
            if (!n.get("py_map_list")) {
                _maps = q.slice(0, 4)
            } else {
                var e = s();
                if (e.length > 2) {
                    _maps = e.slice(0, 2)
                } else {
                    _maps = e.slice(0, e.length)
                }
            }
            if (_maps.length > 0) {
                r(_maps)
            }
        };
        t()
    } catch (d) {
    }
})();